import React, { Component } from 'react';
import SeletctUi from '../selectUi/SeletctUi'
import { loadAsync } from '../actionCreater'
import { connect } from 'react-redux'


@connect(
    state=>{
        return {
            list:state.select.list
        }
    },
    dispatch=>({
        loadData(){
            dispatch(loadAsync())
        }
    })
)
class SelectModel extends Component {

    componentDidMount(){
        this.props.loadData()
    }


    render() {
        return (
            <>
                <SeletctUi {...this.props}></SeletctUi>
            </>
        );
    }
}

export default SelectModel;